﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><? echo TITULO ?></title>
<link rel="stylesheet" href="<?=$this->registry['home_path']?>/public/css/login.css" type="text/css" media="screen" charset="utf-8" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="/system/public/css/ie6.css" />
<![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv='expires' content='-1' />
<meta http-equiv= 'pragma' content='no-cache' />
<script>
function checkEnter(e) { 
	var characterCode;
	if(e && e.which)
	{
		e = e;
		characterCode = e.which;
	} else {
		e = event;
		characterCode = e.keyCode; 
	}

	if(characterCode == 13){
		elemento = document.getElementById("do_pass");
		elemento.style.display = "";
		elemento = document.getElementById("do_user");
		elemento.style.display = "none";
		
		document.login.utilizador.setAttribute('autocomplete','off');
		a = document.getElementById('password')
		a.setAttribute('autocomplete','off');
		a.focus();
		return false
	} else {
		return true
	}
}

function checkEnter2(e) { 
	var characterCode;
	if(e && e.which)
	{
		e = e;
		characterCode = e.which;
	} else {
		e = event;
		characterCode = e.keyCode; 
	}

	if(characterCode == 13){
		document.forms[0].submit()
		return true;
	} else {
		return true
	}
}
</script>
</head>
<body onload="document.login.utilizador.focus();">
<div id="outer">
<div id="container">
<div id="inner">
<div id="login_area">
<form name="login" action="/suser/login" method="post">
	<div id="do_user">
    	<label for="utilizador">Utilizador: </label><br />
    	<input type="text" id="utilizador" name="utilizador" onkeypress="return checkEnter(event);"></input><br />
    </div>
    <div id="do_pass" style="display: none">
    	<label for="password">Password: </label><br />
    	<input type="password" id="password" name="password" onkeypress="checkEnter2(event);"></input><br />
    </div>
</form>
<div style="margin-top: 20px; color: #FF0000;">
<?
 if(isset($mensagem))
 {
 	echo $mensagem;
 } 
?>
</div>
</div>
</div>
</div>
</div>
</body>
</html>